<template>
	<div class="homenewzone">
		<img class="newzonebg" :src="arraydata.publicityPicture||'static/image/demo7.png'" @click='jumpEvent()' />
	</div>
</template>

<script>
	import handlePathSpecial from '../../utils/lxn/handlePathSpecial';
	export default {
		props: {
			dataList: {
				type: Array,
				default: () => []
			},
		},
		data() {
			return {
                arraydata: {},
			}
		},
		watch:{
			dataList(data){
				this.onedata()
			}
		},
		methods: {
			onedata() {
				if(this.dataList) {
					this.arraydata = this.dataList[0] ? this.dataList[0] : {};
				}
			},
			jumpEvent() {
				if(this.arraydata.extendField) {
					// var urldata = JSON.parse(this.arraydata.extendField).url.path
					var urldata = handlePathSpecial(this.arraydata.extendField)
					if(urldata) {
						this.$router.push({
							path : urldata
							// name: "MiddleWare",
							// params: {
							// 	pageName: urldata
							// }
						})
					}
				}
			},
		},
		mounted() {
            this.onedata()
		},
	}
</script>

<style>
	.homenewzone {
		background-color: #fff;
		/*padding: 0.75rem 0rem;*/
		padding: 0.75rem;
	}
	
	.newzonebg {
		margin: 0 auto;
		width: 100%;
		/*height: 3.5rem;*/
		/*border-radius: 4rem;*/
	}
</style>